class SingletonSync {
    private static SingletonSync mInstance;
    private static final Object obj = new Object();

    private SingletonSync() {
    }

    static SingletonSync getInstance() {
        synchronized (obj) {
            if (mInstance == null) {
                synchronized (obj) {
                    if (mInstance == null) {
                        mInstance = new SingletonSync();
                    }
                }
            }
        }
        return mInstance;
    }

    void doSomething() {
        System.out.println("Singleton sync");
    }


}
